<script setup>
import {ref,computed} from 'vue'
const list = ref([1,2,3,4,5,6,7,8,9,0])

const computedList = computed(()=>{
  return list.value.filter(item=>item>2)
})
console.log(computedList);
console.log(computedList.value);

// const addFn = (item)=>{
//   list.value.push(item)
// }

function addFn(item){
  list.value.push(666)
}

</script>

<template>
  <header>
    <div>{{list}}</div>
    <div>{{computedList}}</div>
    <div @click="addFn(666)">按钮</div>
  </header>
</template>

<style scoped>
</style>
